package TraitList

trait Handler {
  def handler(data:String){println("Handler :" + data )}
}
trait DataValidHandler extends Handler{
  override def handler(data:String): Unit ={
    println("DataValidHandler : check data:"+data)
    super.handler(data)
  }
}
trait SignatureValidHandler extends Handler{
  override def handler(data:String): Unit ={
    println("SignatureValidHandler : check signatrue:"+data)
    super.handler(data)
  }
}
class  Person(val name:String) extends SignatureValidHandler with DataValidHandler{
  def sayHello={
    println("Hello "+name)
    handler(name)
  }
}

object Test{
  def main(args: Array[String]) {
    val p=new Person("lixiaolong");
    p.sayHello
  }
}

